package com.woniuxy.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.woniuxy.entity.Bidding;
import com.woniuxy.entity.BiddingRoom;
import com.woniuxy.utils.ResultUtil;



@Mapper
public interface BiddingRoomMapper {

	
	@Select("select br.br_id,br.p_id,br.max_price,br.time  from bidding_room  br ,sign si where br.p_id = si.p_id and si.u_id=#{u_id}")
	public List<BiddingRoom> BiddRoomInfoByuid(int u_id) ;
		
	@Delete("delete  from bidding_room where u_id=#{u_id} and p_id = #{p_id}")
	public int deleroomByuidAndpid(BiddingRoom biddingRoom);
	
	
	@Select("select bi.br_id,bi.alias,bi.price,bi.time from bidding_room  br ,bidding bi where br.br_id =  bi.br_id ")
	public List<Bidding> salelogAll();
}
